Public Class EventCollection : Inherits System.Configuration.Provider.ProviderCollection

    Public ReadOnly Property MakeModelProvider(ByVal name As String) As EventProvider
        Get
            Dim o As Object = Me(name)
            If o IsNot Nothing Then
                Return CType(o, EventProvider)
            Else
                Return Nothing
            End If
        End Get
    End Property

    Public Overrides Sub Add(ByVal provider As System.Configuration.Provider.ProviderBase)
        If (provider Is Nothing) Then
            Throw New ArgumentNullException(("The provider parameter cannot be null."))
        End If
        If Not (TypeOf (provider) Is EventProvider) Then
            Throw New ArgumentException(("The provider parameter must be of type ImageProvider."))
        End If
        MyBase.Add(provider)
    End Sub

End Class
